package com.bawei.yangzongcai___chenmei.BlankFragment.Blanck1;


import android.graphics.drawable.AnimationDrawable;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import com.bawei.yangzongcai___chenmei.MVC.BsaeFragment;
import com.bawei.yangzongcai___chenmei.R;


public class BlankFragmentZhu2 extends BsaeFragment {

    private AnimationDrawable anim;
    private Button kaishi;
    private Button jieshu;
    private ImageView zhongxin;

    @Override
    public int bandLayout() {
        return R.layout.fragment_blank_fragment_zhu2;
    }

    @Override
    public void initView() {

        kaishi = findbandid(R.id.kaishi);
        jieshu = findbandid(R.id.jieshu);
        zhongxin = findbandid(R.id.zhongxin);
    }

    @Override
    public void initDate() {

        zhongxin.setImageResource(R.drawable.zhendonghua);
        anim = (AnimationDrawable) zhongxin.getDrawable();

        kaishi.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                anim.start();
            }
        });

        jieshu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                anim.stop();
            }
        });

    }
}
